﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.ServiceImp
{
    /// <summary>
    /// 方案缓存信息
    /// </summary>
    public class SolutionCache
    {
        #region singleton
        private static SolutionCache s_instance = new SolutionCache();
        public SolutionCache Instance
        {
            get
            {
                return s_instance;
            }
        }
        #endregion

        /// <summary>
        /// 是否在加载方案，
        /// 如果在加载方案则无法进行同步，无法发布
        /// </summary>
        public bool IsLoading
        {
            get;
            private set;
        }

        /// <summary>
        /// 读取方案列表
        /// </summary>
        public void LoadSolutionRefList()
        {
            IsLoading = true;

            // load solutions

            IsLoading = false;
        }

        /// <summary>
        /// 验证所有方案
        /// </summary>
        /// <param name="baseDirectory">所有的方案文件夹所在的目录</param>
        public void VerifySolutions(string baseDirectory)
        {
            IsLoading = true;

            // verify solutions

            IsLoading = false;
        }

        /// <summary>
        /// 验证单个方案
        /// </summary>
        /// <param name="baseDirectory">所有的方案文件夹所在的目录</param>
        /// <param name="solution">方案名称</param>
        public void VerifySolution(string baseDirectory, string solution)
        {

        }
    }
}
